<template>
  <div>
    <h1>Andu哈哈哈</h1>
    {{ count }}
    <el-button type="primary" size="default" @click="addBtn">增加</el-button>
  </div>
</template>

<script setup lang="ts">
//导入Store
import { computed } from 'vue';
import { testStore } from '@/store/test/index';

//获取store
const store = testStore();

const count = computed(()=>{
  return store.getCount
});

const addBtn=()=>{
  // store.count++
  store.setCount(++store.count)
  // store.$patch({
  //   count:++store.count
  // })
  // store.$patch((state)=>{
  //   state.count = ++state.count
  // })
}
</script>

<style scoped>

</style>